//
//  RCTConvert+ReadImage.m
//  YuanXinCamera
//
//  Created by 晏德智 on 2016/10/25.
//  Copyright © 2016年 晏德智. All rights reserved.
//

#import <RCTConvert+ReadImage.h>

@implementation RCTConvert(ReadImage)

RCT_ARRAY_CONVERTER(ReadImageInfo)

+ (ReadImageInfo *)ReadImageInfo:(id)json {
    
    ReadImageInfo *model = [ReadImageInfo new];
    
    model.filePath = [self NSString:json[@"filePath"]];
    model.scale = @([self NSInteger:json[@"scale"]]).floatValue?:0.4;
    model.objectKey = [self NSString:json[@"objectKey"]];
    CGFloat width = @([self NSInteger:json[@"width"]]).floatValue;
    CGFloat height = @( [self NSInteger:json[@"height"]]).floatValue;
    model.size = CGSizeMake(width, height);
    // model.ossFileName = [NSString stringWithFormat:@"%@/%@",model.ossFolder,model.objectKey];
    
    return model;
}



@end
